/**
 * Huisou.com Inc.
 * Copyright (c) 2011-2012 All Rights Reserved.
 */

package com.chenzehe.zdmya.domain;

import java.util.Date;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.persistence.Table;
import javax.persistence.Transient;

/**
 * @description
 * 
 * @author chenzehe
 * @email hljuczh@163.com
 * @create 2012-8-14 下午08:14:17
 */
@Entity
@Table(name = "tbl_message")
public class Message {
	@Id
	@Column(name = "id")
	@GeneratedValue
	private Integer id;

	@Column(name = "msg")
	private String message;

	@Column(name = "type")
	private Integer type;

	@Column(name = "content_id")
	private Integer contentId;

	@Column(name = "user_id")
	private Integer userId;

	@Column(name = "ding")
	private Integer ding;

	@Column(name = "cai")
	private Integer cai;

	@Column(name = "status")
	private Integer status;

	@Column(name = "issue_time")
	private Date issueTime;

	@Column(name = "modify_time")
	private Date modifyTime;

	@Transient
	private String content;

	@Transient
	private String img;

	@Transient
	private User user;

	public Integer getId() {
		return id;
	}

	public void setId(Integer id) {
		this.id = id;
	}

	public String getMessage() {
		return message;
	}

	public void setMessage(String message) {
		this.message = message;
	}

	public Integer getType() {
		return type;
	}

	public void setType(Integer type) {
		this.type = type;
	}

	public Integer getContentId() {
		return contentId;
	}

	public void setContentId(Integer contentId) {
		this.contentId = contentId;
	}

	public Integer getUserId() {
		return userId;
	}

	public void setUserId(Integer userId) {
		this.userId = userId;
	}

	public Integer getStatus() {
		return status;
	}

	public void setStatus(Integer status) {
		this.status = status;
	}

	public Date getIssueTime() {
		return issueTime;
	}

	public void setIssueTime(Date issueTime) {
		this.issueTime = issueTime;
	}

	public Date getModifyTime() {
		return modifyTime;
	}

	public void setModifyTime(Date modifyTime) {
		this.modifyTime = modifyTime;
	}

	public String getContent() {
		return content;
	}

	public void setContent(String content) {
		this.content = content;
	}

	public String getImg() {
		return img;
	}

	public void setImg(String img) {
		this.img = img;
	}

	public Integer getDing() {
		return ding;
	}

	public void setDing(Integer ding) {
		this.ding = ding;
	}

	public Integer getCai() {
		return cai;
	}

	public void setCai(Integer cai) {
		this.cai = cai;
	}

	public User getUser() {
		return user;
	}

	public void setUser(User user) {
		this.user = user;
	}

	public static enum MessageType {
		CONTENT {
			@Override
			public int type() {
				return 1;
			}
		},
		FX {
			@Override
			public int type() {
				return 2;
			}
		},
		JY {
			@Override
			public int type() {
				return 3;
			}
		};
		public abstract int type();
	}

}
